package com.pet_service.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAIL(500, "失败"),
    PARAM_ERROR(501, "参数不正确"),
    SERVICE_ERROR(502, "服务异常"),
    DATA_ERROR(503, "数据异常"),
    ILLEGAL_REQUEST(504, "非法请求"),
    REPEAT_SUBMIT(505, "重复提交"),
    DELETE_ERROR(506, "请先删除子集"),

    ADMIN_ACCOUNT_EXIST_ERROR(507, "账号已存在"),
    ADMIN_CAPTCHA_CODE_ERROR(508, "验证码错误"),
    ADMIN_CAPTCHA_CODE_EXPIRED(509, "验证码已过期"),
    ADMIN_CAPTCHA_CODE_NOT_FOUND(510, "未输入验证码"),


    ADMIN_LOGIN_AUTH(511, "未登陆"),
    ADMIN_ACCOUNT_NOT_EXIST_ERROR(512, "账号不存在"),
    ADMIN_ACCOUNT_ERROR(513, "用户名或密码错误"),
    ADMIN_ACCOUNT_DISABLED_ERROR(514, "该用户已被禁用"),
    ADMIN_ACCESS_FORBIDDEN(515, "无访问权限"),

    APP_LOGIN_AUTH(516, "当前用户未登录，请先登录再操作!"),
    APP_LOGIN_PHONE_EMPTY(517, "手机号码为空"),
    APP_LOGIN_CODE_EMPTY(518, "验证码为空"),
    APP_SEND_SMS_TOO_OFTEN(519, "验证码发送过于频繁"),
    APP_LOGIN_CODE_EXPIRED(520, "验证码已过期"),
    APP_LOGIN_CODE_ERROR(521, "验证码错误"),
    APP_LOGIN_USER_NOT_EXIST(522,"用户不存在!"),
    APP_ACCOUNT_DISABLED_ERROR(523, "用户已被禁用"),
    TOKEN_EXPIRED(524, "token过期"),
    TOKEN_INVALID(525, "token验证失败!");


    private final Integer code;

    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
